﻿if exists(select * from sysobjects where [name]='spm_CreateNotification')
	drop procedure spm_CreateNotification;
	
GO


/**
 * 创建一个提醒
 * 提醒可以设置为在特定的时间产生一个通知
 */ 
CREATE Procedure spm_CreateNotification
@Title varchar(256),
@Description varchar (3000),
@EventTime varchar(2000),
@Users varchar(256),
@TreeId int,
@EventId int output
AS

   insert into dbo.Notifications(Title,Description,EventTime,Users,TreeId) values (@Title,@Description,@EventTime,@Users,@TreeId);

   set @EventId=@@IDENTITY

   return 0;
GO
 
